package com.pearadmin.pro.modules.paper.service;


import com.baomidou.mybatisplus.extension.service.IService;
import com.pearadmin.pro.modules.paper.dto.QuAnswerDTO;
import com.pearadmin.pro.modules.paper.entity.QuAnswer;

import java.util.List;

/**
 * 候选答案业务类
 * @author ZhouXingYun
 * @date 2022/5/24 8:53
 */
public interface QuAnswerService extends IService<QuAnswer> {


    /**
     * 根据题目ID查询答案并随机
     * @author ZhouXingYun
     * @date 2022/5/24 9:48
     * @param quId
     * @return java.util.List<com.pearadmin.pro.modules.paper.entity.QuAnswer>
     */
    List<QuAnswer> listAnswerByRandom(String quId);

    /**
     * 根据问题查找答案
     * @param quId
     * @return
     */
    List<QuAnswerDTO> listByQu(String quId);

    /**
     * 保存试题
     * @param quId
     * @param list
     */
    void saveAll(String quId, List<QuAnswerDTO> list);
}
